﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2011/12/26 23:07:09
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sector7.Restaurant.EntityType;
using Sector7.Framework.Core;

namespace Sector7.Restaurant.DAO
{
    /// <summary>
    /// 雇员模块数据访问对象接口
    /// </summary>
    public interface IEmployeeDAO
    {
        /// <summary>
        /// 创建员工信息
        /// </summary>
        /// <param name="employee">员工信息</param>
        /// <returns></returns>
        long Create(RS_Employee employee);

        /// <summary>
        /// 获取员工信息
        /// </summary>
        /// <param name="uniqueId">员工唯一编号</param>
        /// <returns></returns>
        RS_Employee Read(long uniqueId);

        /// <summary>
        /// 获取员工信息
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        RS_Employee Read(string userName, string password);

        /// <summary>
        /// 根据有效性读取所有员工信息
        /// </summary>
        /// <param name="isValid">员工有效性</param>
        /// <returns></returns>
        List<RS_Employee> ReadAll(bool isValid);

        /// <summary>
        /// 根据员工组编号读取所有员工信息
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        List<RS_Employee> ReadAll(int groupId);

        /// <summary>
        /// 根据员工组编号和有效性读取所有员工信息
        /// </summary>
        /// <param name="groupId">员工组编号</param>
        /// <param name="isValid">员工有效性</param>
        /// <returns></returns>
        List<RS_Employee> ReadAll(int groupId, bool isValid);

        /// <summary>
        /// 更新员工信息
        /// </summary>
        /// <param name="delta">员工信息改变量</param>
        /// <returns></returns>
        int Update(EntityDelta delta);

        /// <summary>
        /// 删除员工信息
        /// </summary>
        /// <param name="uniqueId">员工唯一编号</param>
        /// <returns></returns>
        int Delete(long uniqueId);
    }
}
